<?php
class CartsComponent extends Object{
	var $components = array( 'Auth','Session','RequestHandler');

	/**
	 * 
	 * Destinantions Dictionary
	 * @return array
	 */
	public function destination(){
		$this->Carts =& $this->getModel('Cart');
	    if(!$this->Carts){
	      return false;
	    }
		return $this->Carts->find('list',array('order'=>'Cart.name'));
	}
	
		
	private function &getModel($name = null) {
		$model = null;
		if (!$name) {
			$name = 'Cart';
		}    
		if($name){
			if (PHP5) {
				$model = ClassRegistry::init($name);
			} else {
				$model =& ClassRegistry::init($name);
			}

			if (empty($model)) {
//				$this->_error('FileUpload::getModel() - Model is not set or could not be found');
				return null;
			}
		}
		return $model;
	}	
}